.file "limit_define_riscv64.c"
.text
.section .rodata
.align 3
.LC0:
        .string "Some number limits for this system:"
        .align  3
.LC1:
        .string "Biggest int:%d\n"
        .align  3
.LC2:
        .string "Smallest long long: %lld\n"
        .align  3
.LC3:
        .string "One byte = %d bits on this system.\n"
        .align  3
.LC5:
        .string "Largest double:%e\n"
        .align  3
.LC7:
        .string "Smallest normal float:%e\n"
        .align  3
.LC8:
        .string "float precision = %d digits\n"
        .align  3
.LC10:
        .string "float epsilon = %e\n"

.section .rodata
.align 3
.LC4:
        .long   -1
        .long   2146435071
.LC6:
        .long   0
        .long   940572672
.LC9:
        .long   0
        .long   1048576000

.text
.globl main
.type main, @function
main:
    addi sp, sp, -16
    sd ra, 8(sp)
    sd s0, 0(sp)

    // 这句其实没必要
    addi s0, sp, 16
    // 忽略输出整数的代码

    lui a5, %hi(.LC4)
    fld fa5, %lo(.LC4)(a5)
    fmv.x.d a1, fa5
    lui a5, %hi(.LC5)
    addi a0, a5, %lo(.LC5)
    call printf

    lui     a5,%hi(.LC6)
    fld     fa5,%lo(.LC6)(a5)
    fmv.x.d a1,fa5
    lui     a5,%hi(.LC7)
    addi    a0,a5,%lo(.LC7)
    call    printf
    
    lui     a5,%hi(.LC9)
    fld     fa5,%lo(.LC9)(a5)
    fmv.x.d a1,fa5
    lui     a5,%hi(.LC10)
    addi    a0,a5,%lo(.LC10)
    call    printf

    li a0, 0
    ld ra, 8(sp)
    ld s0, 0(sp)
    addi sp, sp, 16
    jr ra
    